<html>
  <head>
    <meta charset="utf-8">
    <title>电信密码加密</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

	<script type="text/javascript">
	function getN(i) {
        var n,
        t;
        var hash = CryptoJS.MD5("Message");
        var encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase");

        try {
            n = this.aesDecrypt(i);
            n != "" && (t = aesEncrypt(n), t != i && (n = ""))
            var c = n != "";
        } catch(r) {
            n = ""
        }
		t = aesEncrypt(i);
		<!--alert(t);-->
		window.app.returnPwd(t);
        return t;
    }

	    //加密
    function aesEncrypt(n) {
        var t = CryptoJS.MD5("login.189.cn"),
        i = CryptoJS.enc.Utf8.parse(t),
        r = CryptoJS.enc.Utf8.parse("1234567812345678"),
        u = CryptoJS.AES.encrypt(n, i, {
            iv: r
        });
        return u + ""
    };

</script>
<script src="http://cdn.bootcss.com/crypto-js/3.1.2/components/core.js"></script>
<script src="http://cdn.bootcss.com/crypto-js/3.1.2/rollups/aes.js"></script>
<script src="http://cdn.bootcss.com/crypto-js/3.1.2/components/md5.js"></script>
<script src="http://cdn.bootcss.com/crypto-js/3.1.2/components/enc-base64.js"></script>
</head>
<body>
	<input type="button" onclick="getN()"/>

</body>
</html>
